<?php

/**
 * Netdev form.
 *
 * @package    seth
 * @subpackage form
 * @author     Fuz
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class NetdevForm extends BaseNetdevForm
{
  public function configure()
  {
      $pattern= "^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$^";
      
      $this->validatorSchema['ip1'] = new sfValidatorRegex(array('pattern'=>$pattern,'required' => false));
      $this->validatorSchema['ip2'] = new sfValidatorRegex(array('pattern'=>$pattern,'required' => false));
      $this->validatorSchema['ip3'] = new sfValidatorRegex(array('pattern'=>$pattern,'required' => false));
      $this->validatorSchema['subnet'] = new sfValidatorRegex(array('pattern'=>$pattern,'required' => false));
      $this->validatorSchema['gateway'] = new sfValidatorRegex(array('pattern'=>$pattern,'required' => false));

//      'ip2'          => new sfValidatorInteger(array('required' => false)),
//      'ip3'          => new sfValidatorInteger(array('required' => false)),
//      'subnet'       => new sfValidatorInteger(array('required' => false)),
//      'gateway'      => new sfValidatorInteger(array('required' => false)),

  }
}
